@extends('layouts.master')

@section('title')
    消息模块——木投网商城管理后台
@stop

@section('app_css')
    <link href="/resource/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/resource/css/style.css">
    <link rel="stylesheet" href="/resource/css/dataTables.bootstrap.css">
    <link rel="stylesheet" href="/resource/css/fileinput.min.css">
@stop

@section('app_js')
    <script src="/resource/js/jquery-1.11.3.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/jquery.twbsPagination.js"></script>
    <script src="/resource/js/date.js"></script>
    <script src="/resource/js/fileinput.min.js"></script>
    <script src="/resource/js/fileinput_locale_zh.js"></script>
    <script>
        /*date*/
        var c = new Calendar("c");
        document.write(c);
        /*全选*/
        $(function () {
            $("#all").click(function () {
                var checked_status = this.checked;
                $("input[name=demo]").each(function () {
                    this.checked = checked_status;
                });
            });
        });
    </script>
@stop

@section('content')
    @include('common.nav')
<div class="container-fluid">
    <div class="row" id="navLeft">
        @include('common.other_nav')
        <div class="col-lg-10">
            <div class="navbottom">
              <span>您的位置：</span>其他 > 消息
            </div>
            <div class="contentNav">
              <ul>
                <li>消息</li>
                <li class="btn btn-default"><a href="/show_notice">列表</a></li>
                <li class="btn btn-default active"><a href="/add_notice">新增</a></li>
              </ul>
            </div>
            <hr>
            <div class="contentMember_new">
                {{ Form::open(['url'=>'/edit_notice']) }}
                <table class="table table-hover">
                  <tbody>
                  <tr>
                      <th>消息标题</th>
                  </tr>
                  <tr class="newBorder_top">
                      <th>
                          <input type="text" class="input-small form-control" name="title" value="{{ $notice->title }}">
                      </th>
                    <tr>
                      <th>消息类型</th>
                    </tr>
                    <tr class="newBorder_top">
                      <th>
                        <select class="form-control" style="width:260px;float:left;" name="type">
                          <option value="0">请选择…</option>
                            @foreach($type as $k => $t)
                          <option value="{{ $t }}" @if($notice->type == $t) selected @endif >{{ $t }}></option>
                                @endforeach
                        </select>
                      </th>
                    </tr>
                    <tr>
                      <th>消息主题</th>
                    </tr>
                    <tr class="newBorder_top">
                      <th>
                        <textarea class="form-control" rows="3" style="width:260px" name="content" value="{{ $notice->content }}"></textarea>
                      </th>
                    </tr>
                  </tbody>
                </table>
                  <button type="submit" class="btn btn-default">提交</button>
                <input type="hidden" name="notice_id" value="{{ $notice->notice_id }}">
            {{ Form::close() }}
            </div>
        </div>
    </div>
</div>
@stop